package com.pz.cloud.framework.workflow.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pz.cloud.framework.base.model.WorkflowEntity;
import com.pz.cloud.framework.business.workflow.entity.ProcessBind;
import com.pz.cloud.framework.business.workflow.entity.ProcessBindRule;
import com.pz.cloud.framework.business.workflow.service.IProcessBindRuleService;
import com.pz.cloud.framework.business.workflow.service.IProcessBindService;
import com.pz.cloud.framework.workflow.mapper.ProcessBindMapper;
import com.pz.cloud.framework.workflow.mapper.ProcessBindRuleMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class ProcessBindRuleServiceImpl extends ServiceImpl<ProcessBindRuleMapper, ProcessBindRule> implements IProcessBindRuleService {

    @Override
    public List<ProcessBindRule> findByProcessBindId(String processBindId) {
        LambdaQueryWrapper<ProcessBindRule> query = new LambdaQueryWrapper<>();
        query.eq(ProcessBindRule::getProcessBindId,processBindId);
        List<ProcessBindRule> list = this.list(query);
        return list;
    }
}
